Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

I do this in LotusScript...

1. Build a comma-separated string of key:value for each JSON element. That is, in the LS I append <key>+":"+<value> to a string, with commas as required after the first. Let's call this kvOut.

2. Print the following:

header=|Content-Type: application/json|+Chr$(13)+Chr$(10)
header=header+|Cache-Control: no-cache|+Chr$(13)+Chr$(10)
Print header+|{ |+kvOut+| }|

- I'd think in Java one would simply substitute the appropriate things. For instance I believe one has to fetch a PrintWriter to output to the browser, and use '\n', but otherwise it should be identical.

Hope this helps...


Feedback response number DGIE87MHX3 created by ~Holly Zekhipisonnivu on 07/23/2010

Print JSON in a Java Agent? (~Denise Prehipi... 23.Jul.10)
. . I do this in LotusScript... (~James Brewever... 23.Jul.10)
. . . . Print JSON in a Java Agent? (~Denise Prehipi... 23.Jul.10)
. . . . . . dojo.xhdr understands it on return ... (~James Brewever... 23.Jul.10)
. . . . . . . . Thanks for your help! (~Denise Prehipi... 26.Jul.10)
. . . . . . . . . . Sweet!... (~James Brewever... 28.Jul.10)
. . . . . . . . . . . . Some JSON Java Libraries (~Denise Prehipi... 6.Aug.10)
. . Easy way I would do it. (~Rex Pretoolito... 6.Aug.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS